home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / P_ROBO31.ZIP / GORO.PR < prev    next >
Text File  |  1993-02-03  |  1KB  |  28 lines

  1. (**************************************************************************)
  2. (*                             W A R N I N G                              *)
  3. (*                                                                        *)
  4. (*  This Robot has NOT been designed to take advantage of the advanced    *)
  5. (*  features of P-ROBOTS, such as, Shields, Fuel, Teams or Obstructions.  *)
  6. (**************************************************************************)
  7.  
  8.   PROCEDURE GORO;
  9.     { GORO is based on a Japanese 60's TV drama "Ultra-Q"
  10.       Original C-Robot by Hortense Endoh}
  11.  
  12.   VAR
  13.     dir, Range     : Integer;
  14.  
  15.   BEGIN {Goro Main}
  16.     dir := 0;
  17.  
  18.     REPEAT { loop until dead or winner }
  19.       Range := scan(dir, 10); { look }
  20.       IF (Range > 40) AND (ObjectScanned = Enemy) THEN BEGIN
  21.         IF Range < MaxMissileRange THEN cannon(dir, Range); { fire }
  22.         drive(dir, MaxSpeed); { move }
  23.       END
  24.       ELSE
  25.         dir := dir+170; { change look and drive direction }
  26.     UNTIL Dead OR Winner;
  27.   END; {Goro Main}
  28.